.class Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap$2;
.super Landroid/widget/Filter;
.source "MeasuresAdapterWithMap.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;)V
    .locals 0

    .line 215
    iput-object p1, p0, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap$2;->this$0:Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;

    invoke-direct {p0}, Landroid/widget/Filter;-><init>()V

    return-void
.end method


# virtual methods
.method protected performFiltering(Ljava/lang/CharSequence;)Landroid/widget/Filter$FilterResults;
    .locals 8

    .line 218
    new-instance v0, Landroid/widget/Filter$FilterResults;

    invoke-direct {v0}, Landroid/widget/Filter$FilterResults;-><init>()V

    .line 219
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    if-eqz p1, :cond_2

    .line 220
    iget-object v2, p0, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap$2;->this$0:Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;

    iget-object v2, v2, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;->originalFields:Ljava/util/List;

    if-eqz v2, :cond_2

    .line 221
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v3, 0x0

    .line 223
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v4

    .line 224
    invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p1, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object p1

    :goto_0
    if-ge v3, v2, :cond_1

    .line 226
    iget-object v5, p0, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap$2;->this$0:Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;

    iget-object v5, v5, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;->originalFields:Ljava/util/List;

    invoke-interface {v5, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/models/MeasureListModel;

    .line 227
    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/models/MeasureListModel;->getName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v6

    invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 228
    invoke-virtual {v1, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_0
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 231
    :cond_1
    iput-object v1, v0, Landroid/widget/Filter$FilterResults;->values:Ljava/lang/Object;

    .line 232
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result p1

    iput p1, v0, Landroid/widget/Filter$FilterResults;->count:I

    :cond_2
    return-object v0
.end method

.method protected publishResults(Ljava/lang/CharSequence;Landroid/widget/Filter$FilterResults;)V
    .locals 0

    .line 240
    iget-object p1, p0, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap$2;->this$0:Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;

    iget-object p2, p2, Landroid/widget/Filter$FilterResults;->values:Ljava/lang/Object;

    check-cast p2, Ljava/util/ArrayList;

    iput-object p2, p1, Llt/noframe/gpsfarmguide/adapters/MeasuresAdapterWithMap;->fields:Ljava/util/List;

    .line 241
    invoke-virtual {p1}, Landroid/widget/ArrayAdapter;->notifyDataSetChanged()V

    return-void
.end method
